/**
   * Develop with a Github issue as the assignment and open a pull request
   *
   * @param githubToken Github Token with permissions to write issues and contents
   * @param issueID Github issue number
   * @param repository Github repository url
   * @param source Source directory
   */
  @Function
  public String developIssue(
    Secret githubToken,
    Integer issueID,
    String repository,
    @DefaultPath("/") Directory source
  ) throws ExecutionException, DaggerQueryException, InterruptedException {
    // Get the Github issue
    var args = new Client.GithubIssueArguments().withToken(githubToken);
    GithubIssue issueClient = dag().githubIssue(args);
    var issue = issueClient.read(repository, issueID);

    // Get information from the Github issue
    String assignment = issue.body();

    // Solve the issue with the Develop agent
    Directory feature = develop(assignment, source);

    // Open a pull request
    String title = issue.title();
    String url = issue.url();
    String body = assignment + "\n\nCloses " + url;
    var pr = issueClient.createPullRequest(repository, title, body, feature, "main");

    return pr.url();
  }
